package com.example.partner.common;

public class BaseResponse<DATA> {

    private static final int HTTP_REQUEST_SUCCESS_CODE = 200;

    public int code;
    public String message;
    public DATA data;


    public boolean isSuccessful() {
        return code == HTTP_REQUEST_SUCCESS_CODE;
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public DATA getData() {
        return data;
    }

    public void setData(DATA data) {
        this.data = data;
    }
}

